char *reverseLeftWords(char *s, int n)
{
    char tmp;
    int len = strlen(s);
    int i;
    /* 第一步全部都堆成交换 */
    for (i = 0; i < (len / 2); i++)
    {
        tmp = s[len - 1 - i];
        s[len - 1 - i] = s[i];
        s[i] = tmp;
    }
    /* 划区分交换回来 */
    /* 反转后的前半分区复原 */
    for (i = 0; i < (len - n) / 2; i++)
    {
        tmp = s[len - 1 - n - i];
        s[len - 1 - n - i] = s[i];
        s[i] = tmp;
    }
    /* 反转后的后半分区复原 */
    for (i = 0; i < n / 2; i++)
    {
        tmp = s[len - n + i];
        s[len - n + i] = s[len - 1 - i];
        s[len - 1 - i] = tmp;
    }

    return s;
}